package twidledee.client;

import java.io.Serializable;
import java.util.Date;

import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;

@SuppressWarnings("serial")
//@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Tweet implements Serializable {
	
	private User user;
	private Date date;
	private long tweetId;
	private double latitude;
	private double longitude;
	private String source;
	private String text;
	private int hashCode;
	private boolean isFavourited;
	private boolean isRetweet;
	
	public Tweet(User user, Date date, long tweetId, String source, String text, int hashCode, boolean isFavourited, boolean isRetweet){
		this.setUser(user);
		this.setDate(date);
		this.setTweetId(tweetId);
		this.setSource(source);
		this.setText(text);
		this.setHashCode(hashCode);
		this.setFavourited(isFavourited);
		this.setRetweet(isRetweet);
	}

	private void setUser(User user) {
		this.user = user;
	}

	public User getUser() {
		return user;
	}

	private void setDate(Date date) {
		this.date = date;
	}

	public Date getDate() {
		return date;
	}

	private void setTweetId(long tweetId) {
		this.tweetId = tweetId;
	}

	public long getTweetId() {
		return tweetId;
	}

	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}

	public double getLatitude() {
		return latitude;
	}

	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}

	public double getLongitude() {
		return longitude;
	}

	private void setSource(String source) {
		this.source = source;
	}

	public String getSource() {
		return source;
	}

	private void setText(String text) {
		this.text = text;
	}

	public String getText() {
		return text;
	}

	private void setHashCode(int hashCode) {
		this.hashCode = hashCode;
	}

	public int getHashCode() {
		return hashCode;
	}

	private void setFavourited(boolean isFavourited) {
		this.isFavourited = isFavourited;
	}

	public boolean isFavourited() {
		return isFavourited;
	}

	private void setRetweet(boolean isRetweet) {
		this.isRetweet = isRetweet;
	}

	public boolean isRetweet() {
		return isRetweet;
	}
}
